UPDATE: Changed encoding to not use xml documents