Code cleanup, planning fix.