Refactoring to serialize trip separation