Template working but messy