Reorganized drawwindow.cpp a bit