Hooks

Minor stylistic nit: why is policy_hash computed above into a temp variabe, but node_hash isn't ? Couldn't you just make that `policy: policy_hash(policy)` w/o the temporary ?

Also, this section is missing some blank lines between methods ...