Comment clean up
Rewrite epoche calculation and add tests