added routes for mainhandler and templatehandler...