Add object mapper factory, remove old tests, improve serialization tests