bit of clean up work, moved functions so that they are not in the JFusionFunction.