Electron diffraction at stepped homogeneous and inhomogeneous surfaces