Finished up updateDB

Wrote the necessary components to updateDB. Decided to have updateDB
return the updated info to use in returnJSON so I didn't have to query
the DB yet again.

Also added a little more into validateHash to make sure the incoming has
is the correct length and is in hex.

Decided to rename generateReturn to returnJSON to reflect the difference
between returning good data and error codes (returnError).