Refactoring of report publishing to make code clearer and easier to maintain.  There is a bunch of hard coding which needs to go