Moving large chunk of reporting code to the bottom to get out of the way
Moving report code around