Made most of Andy's changes to rest of code.
Element page: added group and period headers.