Clean up code and add rewind again.