Clean master copy from may12

Modified headers in {read,write}_ori to "modern type"
slightly modified documentation type (not clear what do you mean here)
run tests, all pass.