Cleaning
Add argument to enable loop mode (default off)