Rewrite all code according to yandex style

closes #20