refactored to use Mongoskin instead of Mongoose, and for templating refactored to use HBS instead of SWIG