Rewrite epoche calculation and add tests
Updated to use DBAL
Multiple calculation errors fixed
Moved calculation to DataValues/Time