Fixes Issue #24

The gRefresh variable wasn't reliable and it only worked for a single
entity. I was able to remove the need for the gRefresh variable.