Turn this into a proper class.