Removed PEP-8 induced line length changes.
Added comments.
Fixed bug that would cause group not to be changed upon facility change in tabular report view.
Made HTML class and id names more meaningful.