Minor reorganization of avio.jl