Adding deprecations and fixing errors