some refactoring + add VIES invoice integration