Fixed an error in error handling code.  Also got rid of references to the sqlite database.  We're using the drupal db from here on out.