I want to use this.
It does need a bit of work, and I agree that the lead at the end sounds awkward. I like what it brings to the end, but I don't like how it brings it; I think you should keep it, but change the notation, or maybe just play with the velocities a little. Maybe both, iono. I also like how it bops around between left/right, too.
The bass at the end is drowned out by the lead and drops, though. Try bringing it up a little? The bass (not the humming lead sound, but the one that kinda sounds like a guitar) in the middle and at the end sounds a bit bland. Again, try playing with the velocities.
I really want to use this. It's nice and groovy, subtle but varied, and is redundant but still kept fresh. It has length, and the lead at the end spices it up a bit and makes it sound more lively. But, the looping needs a small amount of work, with an echo or reverb suddenly getting cut off when it starts over again.