some refactoring
warnx shouldn't end with a newline
add some basic colour support