module restructure to support minification
added op macro and minor minification improvements