Refactored code and added missing dependancies for logging