Complex sentence: Going first to Jamaica to arrange lodgings for Josefa and Gregorio, MacGregor was almost arrested there on charges of gun-running--he joined his troops on San Andrés on 4 April.
Split into simpler sentences: Going first to Jamaica to arrange lodgings for Josefa and Gregorio, MacGregor was almost arrested there on charges of gun-running. He joined his troops on San Andrés on 4 April.