Separation Bubbles and Vortex Formation in Cavity Flows