Added option to change only severity for known errors

Also improved overall readability of the known_errors code.