Added main code, additional comments, and a delay