Getting rid of legacy code