Browserify

Switched to using browserify, and modified the client's API.