Numerous #include fixes after command line testing