Refactoring and getting tests working. Beginnings of oasis file creation.