more database abstraction improvements and fixes; allow detailed debugging on errors if omega/debug is true