Restructured entire codebase