trim redundant and commented code