Fixed bug in collision detection
Added gravity and wall collision detection