Fix for #31. Additional cleanup to serializer