beginning work on Merge functions, basic command generation up