Horizontal and Slanted Wells in Layered Reservoirs with Crossflow