Remove unnecessary code and add comment