Change error handling and pin posting in DB classes

Make the DB classes static
Make DBStore postPin return a pin
Modify error handling from the DB classes