integrate 7 scripts into one, massive cleanup