Added flush functionality, cleanup will follow

Should work a little better now if the user just stops the motion before
releasing the grip. Code is cluttered, so it will be cleaned before the
next commit.