Refactor to use vigil, remove dead code.