Switched word-counting utilities, cleaned up a bit