Code cleanup, resize fix.