Added getVisibleCoordinates function to rendering context. Cleanups.