feat: added configurable checkpoints history

added configurable checkpoins history, to avoid growing the size of database, bugfixes, pep8
Merge pull request #2 from d1ffuz0r/configurable_checkpoints

feat: added configurable checkpoints history