Added the option to limit the amount of strokes stored in memory