Fix compile errors. Add assumeUnique function.