minor refactoring of Bugsense feature to make it easier for removal in production builds