Added initial code from Jorg. Renamed functions, tables, etc to webhook_register.