Added proper error handling to db.go, misc. spelling fixes.