Refactor complete

* Taking advantage of JS closures & CoffeeScript's script transformations to provide encapsulation.