Template clean up
Template fixes and improvements
Update database