Change deprecated .size() to .length

Leftover dependency from when it used ArrayLists

Change buildPage method from private to public