Revert "Remove some code."

This reverts commit deee9424471126487279b4d5e5e2ebb341f8aa5c.