#3 - some re-factoring.