DRY refactor. I'm an idiot.