Fixed calculations for travel. 
Fixed merged code.