Add "loop" option (closes #1)