Move merge logic out of module in to main lib.
Tests - sample data