Cleaned up mainAct