Refactored some silly inefficiencies that have been hanging around. Improved build script.