Better MainActivity

Things are now broken up into functions better