We should create a base class for this, rather than copy-pasting into two different classes.