Misc cleanup of SDL and resize code