Move stuff from global scope to class scope.

For some reason we need to refer to the class explicitly in order to change the attribute for all instances, this feels
extremely dirty and there must be a better way.