Added deprecation decorator according to discussion.