Refactoring. Move some parts to a separate projects