Revert "Removed obsolete code"

This reverts commit c27f37eaf8141c2e5e9805240c4b61ebe08b8b09.