Added xpol support

Can now write XPOLDATA. Still needs to be tested with live data.