Queries Hw 3.  Almost completed.  Need to do 17.

Added comments and fixed mistakes.  Also completed the other half of the
assignment.  Number 17 is proving to be difficult.