Provided better comments, simplified adapter