refactor commonjs normalization