Removing redundant values