metadata conventions - ref col encoding improvements, fixes and tests