Exception check and Class adjustes to Python BP.

Exception check and Class adjustes to Python Best Practice