Minor re-factoring