random fixes to setup.py
use .replace() for modifications
use the cls parameter of the classmethod
remove superfluous if block
simplify