Removing unused references, works for >2012

Making sure all unused references are removed from the c# code. Tested
and make sure that it installs fine for 2012.