Errors and filters

Can now add and run user defined error callbacks.

Can now add and run user defined filter callbacks, but just a single one for each type right now.

Build passes on `>=5.3`.