remove comment lines
remove unnecessary globals