Refactor PagerAdapter to ViewPagerAdapter