Factorize soap12.py & soap11.py