Complex sentence: For a number of years, Smith was interested in the construction and equipment of railroads in Cuba, while the island was still under Spanish rule.
Split into simpler sentences: For a number of years he was interested in the construction and equipment of railroads. That was while the island was still under Spanish rule.