added comments to barrel.h and .cpp