Fixes to the CRUD events framework
Better extendability + rename "when" to "hook"