Auto rotate and dublicate removal