refactoring: make structure as modules and tests more specific