#97 move modal logic to save and load modals