Moved widget logic from helper to model, made abstract