Removes most of the duplicated parse functions, introduces a common assert_field function with a more expressive error message.