Replace globals with a dependency on the class ;)