Fix tests
Allow custom merge implementation