Adding loop and loopInteval options

Removing unused test
Merge pull request #7 from roshiro/set_infinite_loop

Adding loop and loopInteval options