Cleaning code and add comment