More changes to cfunct.py - not done yet (don't merge)