Tidied up logging and removed unnecessary dependency