fixed issue 19. also removed unused parts from mainactivity