more refactoring towards guzzle and monolog, much cleaner now