Updated comments and added looping

This new version loops every 10 minutes. There are also new additional
comments to make it easier to understand and adapt.