reorganized code and removed primary key from insert and update
reorganized code and removed primary key from insert and update

https://app.asana.com/0/201954860780444/205761505868165

DannyEaton/growify,DannyEaton/growify,DannyEaton/growify,rdicharry/growify-fork-20161209,rdicharry/growify-fork-20161209,rdicharry/growify-fork-20161209