FMI: first attempt to test the fieldlinetracer, externalize some functions to avoid repetition