Copied matched_effects over from optmatch
Cleaned up some error handling; initial set of covariance tests