Remove unused variables and ; at end of line