moved legacy code in widget class to relevant compatibility class
fixed static variable version