Replaced most of lib/.js with modules using Browserify (#7)