These methods were in a couple other places, so I moved them here to more easily share across the two components.