yay for database connections, and lots of saanity checks.

also a new exception class to allow us to format ou exceptions as we want.