Fixed some bugs with templates, edited some styles