Fix settings variable name
Auto-create cf
Fix session creation
Some pep fixes