Added new tests for Commit and Diff

Added new tests for commit and diff.
Refactored infrastructure.