Minor refatoring.