Cleaned up logging a bit further