The relations between plasma wall interaction and plasma core properties are studied by spectroscopicmethods applied to the emission of neutral particles at the plasma boundary. The interdependencebetween the structure of the scrape-off layer (SOL), particle-fluxes and impurity release are analyzed.In particular, the importance of molecule formation for impurity release and particle recycling in amachine with an "all-carbon" surrounding is shown. These mechanisms can lead to a stationary dischargewith a cold plasma mantle ("detached plasma"), the properties of which are discussed. Local heatinginside the SOL with ICRH is evident and some consequences for gas release and impurity generation aredrawn.