Keyframe optimization

fixes #22