revamp templates

I'd _totally_ rather have some of what appears to be repetition than the twisted logic that was there before.