Cleaned up deprecated code support.
This should help with analyzing how it works.