Some modifications as per Winston's suggestions.