From prototype 2 beta: processing

- Rationalization of the functions and the loops
- Implementation of rewind function