Cleanup the apis
use paths
clean up the file open api

need to figure out a better way for passing flags...
cleanup tests, fix to_raw_datum