Fixes and streamlining (logging as well)