Adding upgrade functionality to barracks
Fixing merge conflicts