add more self-checks
fix comment spelling
remove implementation of impossible events

+ simplify some code
+ add more comments
Temporarily replace point sampling with naive alg.
reformated writeTree and removed unused file