Updated to bring in line with documentation; added XDR support