remove commented code and remve unused variables