Tidied up reporting code