Added a deprecation warning to the old style API.

This completes #121.