Modified main activity class