code cleanup - removed dead code and commented code