Refactored to use Factories for json and commit
Commit can now be manipulated to do useful stuff