refactor the build files