Remove deprecated and commented code