Initial report commit.
Contains a lot of extra report code.
Excessive comments need to be removed later.