Some cleaning up and implementing Logger abstraction