Restructure the codebase