Replace label positioning, add XML headers, fix whitespaces