Reducing number of heartbeat messages.
Only send screen size update if it makes sense.
Changed hash method to improve speed.