Refactoring and changed logging levels