removes unused code
main window support