Fix up some more derps and added debug implementation into mainwindow