Merging with AFRL Sorcer - many changes and fixes