Changed to class methods with self.