Added mustache for templating and some fixes in core.