Major refactoring

* Completed some TODOs scattered accross the code
* Did some refactoring from feedback on javascript dominicana
** Created individual files for entities
** Experimented with creating object instances instead of factories
** Changed the way modules are exported, now is not necessary to specify a namespace