Revert "Remove obsolete code."

This reverts commit 3f13523f972eee25a6e1f750af27212c5a342611.