Refactored logic on the home controller to abstract the logic of dynamic widget inclusion on the client site