when i swapped the motor in my 07, not having all the grounds connected caused very odd cranks... truck wouldn't run without the headlights on, then it wouldn't shut off without turning off the lights... ignition key did not always operate correctly... dash and displays did not operate correctly headlights dim on passenger side, normal on drivers side
finally found one ground that i had missed was disconnected on the passenger side bell housing,
That was the only one i missed and it wreaked havoc.