Updated mainactivity per code review