STM-theory: Image potential, chemistry and surface relaxation