More optimization related changes.