Minor code cleanup and fixes. Attempting to make the extension more reliable on slow-loading boards