Code slightly reordered...