Parity
conversion and error handling cleanup
#403
Merged
Parity
conversion and error handling cleanup
#403