changed all handlers to use the new template api
changed the api call for template struct
created new base template which will be used as layout