Trim off redundent things as per instructions.