Refactor Record Select Methods to use the query() Method

Avoiding the use of global variables as index pointers, this avoids
having multiple calls trampling all over each other. It also makes for
cleaner queries and, hopefully, easier future maintenance.

Fixes #38