The edge plasma plays key roles in tokamak devices: generates the edge transport-barrier yielding the L-H core confinement transition, distributes the core charged-particle energy to surrounding material surfaces, shields the core from impurities, and removes helium ash in fusion plasmas. The transport of density, momentum, and energy in the near-separatrix edge region, and the corresponding self-consistent electrostatic potential, require a two-dimensional description, here incorporated into the UEDGE code. In the direction across the B-field, both turbulent transport and classical cross-field flows are important. The role of classical flows is analyzed in detail in the presence of an assumed diffusive turbulent transport. Results and explanations are given for the generation of radial electric field near the separatrix, edge plasma asymmetries and differences between double-null DIII-D and NSTX devices, comparisons with DIII-D diagnostics for single-null divertor, and core/edge transport coupling.