Added a simple test. Updated code against deprecations.