Refactors code.
Updating frame insteads of updating contentOffset to prevent the problem of scrolling scrollView inside scrollview.