Separate functions
Implement saving strokes
Merge branch 'refactor'