Dynamic grid width, safer app loop