Fixed function names
added helper script
Generalised helper script a little...