Save functionality complete

Saves everything like it should. But most likely will need polishing in
near future.