Removed calls to dedupe function, as it doesn't work.