Slight code re-arranging.