Refined mainactivity