cleaned up template layout