Support creating and modifying repos

There are a few TODOs in here which I plan to address, but opening to get feedback on the approach so far.

ping @titanous 
Yeah, I don't think we can assume that. There are legitimate N of M scenarios for the threshold.