Merge support

again there are likely still some edge cases not covered and the tests should be expanded but its a start. as it implements cascade it requires #200