Could really use some documentation comments here. Note that there'll need to be a corresponding spec PR explaining this as well, the two should be fairly similar.