Clean up logging, and remove dependancy