Geometry and Dynamics of Homeomorphisms in Dimensions 1 and 2