Added a lot more documentation, fix for the demand files being saved to
crappy filenames