Restored settings when re-opened

Used serializing globals to file. Very very ugly. Gave up on restoring
the state of setting fragment as it seemed I'd have to manually reset
all the check boxes, etc. This was more efficient