hooks_def -> hook_def
'NULL' for null values in the database
psa_run_hooks() function simplified
removed calls to hooks