Replacing old main activity with new code.