Added logger and code cleanuo