Fix requirejs production build. Remove some unused code.