refactored some things in mainscreen package