Slim Support

Support for [slim](https://github.com/slim-template/slim) templates - fixed from previous pull request.