Make main form save config automatically on exit

Signed-off-by: James Tasker <james_tasker1@hotmail.com>