added SampleHistory class
reworked the code to be in adequation with the expected result.
clean & comment
Added lim exception, cleaned.
it's like Mr Clean went through there
adjusted the changes to match johannes optimizations
cleanup
Merge pull request #64 from Galithil/make_history_class

Make history class