Cleaned up and made template markup more consistent.