Added dbgetrow; bugfix in the exception class
Tidied code