Added indicate() method; refactored main loop