Re-wrote jump and gravity handling.