After the weekend i am having some issues with my TJ

On the trip I had an issue with the engine being very lumpy and not idleling, switched the car off and then started it and it was fine.
Now the engine idles really high and the check engine light is on.

There was also a stance noise coming from the transmission and or drive train ?

Any help would be appreciated