Refactor to separate widgets from their actions and make the builder widgets more modular