Introduce more strongly typed SNatives, templates for generating contract, and test for permissions contract