Move PageView from viewer.js to its own file