Added the ability to save and load from yaml files and some other minor fixes.