fix some problems in repository
add comments for merge tests
refactor commit, follow 1 based indexing for commit parents