Rewritten mainwindow class to make it ready for sprite/spritestore refactor