Clean up of deprecated code