compile templates on initialization
rename handler to more appropriate name