simplified code and support for template engine loading (multiple template engines support)