Cleaned up deprecated method.