Move non-specification code into companion object.