requirejs commonjs code cleanup