Removing pi deprecated code