Some Fixes and a loop mode