Huge MainActivity refactor.