Move file open/save button interaction handling out of index.html.