Merge updates by Alexander Yavorsky with my corrections