Core: Tools: Have mode values set by enums

Maybe this is unpopular. However here I've removed magical numbers
with enums. These are not, unfortunately, the C++11 style enums which
can be types. If they were types, then we could assert that the
correct enum is applied with the right matching field.