fixes #38
attempted to fix some JSON problems when sending to the server
Merge pull request #40 from jcgharvey/modelTidy

Model tidy