Remove unused files and fix the build