Add custom logger support. Refactor response error handling. Clean code to follow reek style guide.