Added repository and inserted barrier statements