Implemented logic for comment shortener