Refactor watchers code

Merging this should ease up rebasing #906 until I figure out how to fix it.