Modularizing the templates to make it a little more manageable

Also adding some formatting and styling