Improved datastructure for tick, added tests and modified example further