diff --git a/corsika/detail/modules/pythia8/Decay.inl b/corsika/detail/modules/pythia8/Decay.inl
index 163ec37a7864fdd2b2c85022aaafce73e73d6739..e02f38b8631f73e0aa769b207fe136f3f2faa29b 100644
--- a/corsika/detail/modules/pythia8/Decay.inl
+++ b/corsika/detail/modules/pythia8/Decay.inl
@@ -12,8 +12,6 @@
 
 #include <corsika/framework/utility/COMBoost.hpp>
 
-#include <corsika/setup/SetupStack.hpp>
-#include <corsika/setup/SetupTrajectory.hpp>
 
 namespace corsika::pythia8 {
 
diff --git a/corsika/detail/modules/pythia8/Interaction.inl b/corsika/detail/modules/pythia8/Interaction.inl
index 74a910de769ff259aeafacc46e9b2d74d02e32e5..56dfeb2e4e7ca39a610476c08bb391ec63195546 100644
--- a/corsika/detail/modules/pythia8/Interaction.inl
+++ b/corsika/detail/modules/pythia8/Interaction.inl
@@ -15,8 +15,6 @@
 #include <corsika/media/Environment.hpp>
 #include <corsika/media/NuclearComposition.hpp>
 
-#include <corsika/setup/SetupStack.hpp>
-
 #include <tuple>
 
 namespace corsika::pythia8 {
@@ -155,8 +153,9 @@ namespace corsika::pythia8 {
     }
   }
 
+  template <typename TParticle>
   inline GrammageType Interaction::getInteractionLength(
-      corsika::setup::Stack::particle_type const& particle) {
+      TParticle const& particle) {
 
     // coordinate system, get global frame of reference
     MomentumVector const& pMomentum = particle.getMomentum();
diff --git a/corsika/modules/pythia8/Interaction.hpp b/corsika/modules/pythia8/Interaction.hpp
index f2d264db15befbad789b0ba2afd122fa0e586f86..8685540468541c451e9453f26d659fbd668f6521 100644
--- a/corsika/modules/pythia8/Interaction.hpp
+++ b/corsika/modules/pythia8/Interaction.hpp
@@ -14,8 +14,6 @@
 #include <corsika/framework/process/InteractionProcess.hpp>
 #include <corsika/modules/pythia8/Pythia8.hpp>
 
-#include <corsika/setup/SetupStack.hpp>
-
 #include <tuple>
 
 namespace corsika::pythia8 {
@@ -38,7 +36,8 @@ namespace corsika::pythia8 {
     std::tuple<CrossSectionType, CrossSectionType> getCrossSection(
         const Code BeamId, const Code TargetId, const HEPEnergyType CoMenergy);
 
-    GrammageType getInteractionLength(corsika::setup::Stack::particle_type const&);
+      template <typename TParticle>
+    GrammageType getInteractionLength(TParticle const&);
 
     /**
        In this function PYTHIA is called to produce one event. The