It's always tricky to get the platformer physics right. Here I think it's mostly fine but the first thing I would change is the way you move in the air. When the character jumps forward, I expect that it will stop its forward momentum when I stop pressing forward. It makes jumping on platforms much more precise. For example, you can add in your code values for air deceleration and ground deceleration when the player stops pressing forward.