Clean up logging in, and add more specs