Tidying up logging, custom classes