move function definitions to own files

Hi Robin,

I think you should move the function definitions in the visualisation file to their own files so the user can cal them in their own script