Initial merging functions and tests - Trello 174