Changed pages HashMap key to Integer (page id) & added documentation javadoc