Add more error codes, messages and error checking.

That doesn't look right. ErrTooFewPublicKeys when we pass an invalid pub key?