Revised main activity

deleted redundant codes and directly assigned id's.. declared intent outside the switch and placed startactivity outside the switch