Refactors uglify into seprate components for library and production files