Worked on query()

Did a lot of work on query(). Still not functioning fully. Added a
directory to do the testing in.