Better handling of common repo

Lot of work todo yet.