And removing some useless code