Fix the functions.sh, to use new local / remote repo codes