restructure codebase as discussed