Some more refacotring.