huge rewrite, split to base and yandex-specific parts

any suggestions?