huge rewrite, split to base and yandex-specific parts

Have you paid attention to mutable object creation in args?