Minor refacotring