Changes made by Ivan Pidov (ivan.pidov@gmail.com).