Code cleanup. Tweak a few templates. Add a few others.