Refactor Serializer namespace