Fix issue 4
Fix issues 2 and 3

Because we were testing by type as well, pages needs to be an integer.
Merge branch 'issue2'