Added player gravity and collision detection