Fix tests and watch out for non-visible classes