Some error handling details have been enhanced.
Moved error-codes file to doc/