Minor fixes after refactor and improved logging