Small fixes and refactoring in ther merger serializer