Define instance functions on prototype
Moved object definitions to a namespace
Removed requirejs dependency
Added some convenience methods
Improved readme