Add clear function and rename saveFlow function to 'save'