allow defining extended class name
fix race condition
rename super to __super__ to avoid name clashes
sort the keys for nicer json