restructure codebase