cap_factory.py now PEP 8