Fixed issues writing assigned groups to AD;fixing issues with creating new principal objects;will unit test tomorrow and also fix race conditions in UI viewmodel