Change naming for functions to conform to PEP 8. Also deprecate old

read/write api.