Refactor to allow custom tabs to be registered and their settings saved. #1484