Basic line-mode
Make DB return results instead of printing them

Also have it throw an error when the table doesn't exist and catch that
error in the UI for a nicer error message.
More eliminating puts from the DB api