Update js-yaml + clean up code