Some optimizer code. (Not working yet.)