Miscellaneous refactoring

Merged Darryl Green requested to merge github/fork/CJKay/refactor into master

Created by: CJKay

This PR does some miscellaneous refacotring across the codebase, including fixing up certain minor inconsistencies and cleaning up code style.

Merge request reports