Save changes before sleep...
Another hugh revamp, almost ready for testing complete workflow.