add support for new status=registered params; some refactoring in querys...

...tring building to use gem

@carrickr