Refactoring drag and drop.
Adding merge feature.