Split out the visitors into smaller functions.

TODO: Merge all the visitors into one huge visitor.