Changed widget logic, for simpler integration with third-party widgets