Revert "First round of bug fixes"

Reverts ONEDC/obix#112