Added limits to lateral and vertical movement.