refactor errors and tests
refactor returned object keys

also add a test for single column options queries
refactor errors and tests