Added split merge tests
Moved util functions into util.js