Added minor changes to make it easier to load widgets independently.