Added ECS serialization util functions and added unit tests