CRM-12864
Merge pull request #1076 from yashodha/new-hook

CRM-12864
Merge pull request #1075 from eileenmcnaughton/master

Various tidy ups in preparation for CRM-12984
CRM-12986 fix schema so required fields are required / not null