Part of old code added.
Old tests re-added.