Refactored the deprecated stuff.