Big refactoring. split modules