Updated example with better comments and decreased sleep time.