clean up code according to pareview.sh report