Code clean-ups and log level streamlining