Reduced amount of modified code by removing IMPLEMENT_PYCLIENTCLASS/IMPLEMENT_PYSERVERCLASS and integrate it into DECLARE_PYCLIENTCLASS/DECLARE_PYSERVERCLASS
Removed duplicate PyErr_Clear call
Removed unneeded commented code