Update from Francisco with modifications.