Made looping more reliable.

Also split openAndPlay() into open() and play(), and deprecated the
original method.