Refactor openfmri glue code to make it better manageable wrt foreseeable layout changes.