Added adapter class, removed warnings.