Improved error handling of loading from yaml, removed unnecessary data