Initial changes to support Oblivion.

Untested on actual files, but it runs without errors otherwise.
typos