Added deprecation annotations. Some from a pull request got removed during merge.