merge functionality commit

~2/3 of the way done with merge I believe