Tweaks on further preparation to use functions.py