Moved serializer helpers out to separate files so that they can be
included in Core as well.