Require: modify the exports to be used in Browser

When creating a require() loader for the browser, the module.exports
object can't be set to a function.
Refactor: move shape classes into separate files

Now that we can require from the client side, this is possible.