Refactored Browserify transformer