code corrections, added variable name cleaning code