Merge and delete functionality implemented. Needs a lot of testing.