Added code for StatisticsCalculator, Periode.. etc

Added a lot of code. Currently not functioning for Periode is acting
strange.
Not tested...