updates to the database structure and then added functionality to the externals for the database.
added exception logging