Changed DB libraries to use DBResults object

As a result a lot of method had to throw Exceptions