Add ext hooks.

Works exactly like flask without the legacy namespacing.