Revert "Cut out code that is not in use"

This reverts commit c82036b42e6be269dc1610ac8c37ebb855870c49.