Squashed common code.