refactored whole mainactivity, now it's view oriented.