Updated tests to refelect previous merge - simplified impl a little