MainPanel moved to a separate class.