Adding merging code
Adding most of the code, removePartitions still broken