refactored mainwindow to kpoApp