Complex sentence: She was transferred to the Mediterranean Fleet in 1897 and returned home in 1902, and was briefly assigned as a coast guard ship before she began a lengthy refit in 1903--1904.
Split into simpler sentences: She was transferred to the Mediterranean Fleet in 1897 and returned home in 1902. The ship was briefly assigned as a coast guard ship before she began a lengthy refit in 1903--1904.