first pass at commitment tree without any segfaults
first pass with little bit of manual testing