This is being reverted because it was so disjoint from the other work that it is meant to work with that I was unaware of the intent of the code. This is not doing something that I feel is correct, so any changes here need to be merged into the other, more relevant PRs so it can be reviewed wholistically.