Merge pull request #149 from gitMbar/dev

Add some form validation to comments
Optimized database write by adding new batch property function.  Refactor database write and various other code