Hard refactoring work 0.1