Catches exceptions parsing the metadata block.
A set of stylistic fixes.
Removes unnecessary extensions from requires.
Adds error handlers for 400, 500 and a general one.
Adds a helper to check returned definitions.