Merged together most up-to-date versions.