split into another subspec, added some parameter checking, fixed old header docs