repaired mainFrame and some other useless shit