adding ability to add handler for root and adding templating