Removal of legacy code