Clean up template code and update UI to reflect design comments