Improved logging, cleanup and refactoring of utils into services