adding core methods from template code, updating comments
fixing primary key security flaw as per Darryl
Merge branch 'kohana_v3.3/master' of github.com:claerosystems/cl4 into kohana_v3.3/master