Fixed wall detection. Now collides with all sides of wall and stops appropriate movement.