Refactor to put some of the garb into its own dir.