added mustache template; added custom template module; some refactoring ; still sucky code