one last pass to tidy things up
useless comments for jerks who don't like to read code
refactor the keyword repository to make it smaller, and some general logging stuff