Get rid of unused references to .dll's and fix a compile warning