add a path integrator and fix several issues

TODO: add typesafety to incoming and outgoing directions