Added loading and saving of state...etc