Imporved serializer. Reduce complexity and added unit tests for PROV-O