Refactor: dont pass klass around