Cleaned mainFrame for better cohesion