Remove at least some of the bad code duplication, bad justin, bad.