Moved viewpager adapter to main activity and fixed passing index to fragments