Refactored to remove globals

* Added custome template support
* The module now exports an Object instead of a function
Added a link back to Hillel's project.