Code cleanup, new logging output window