GCC and Warning fixes

Headers, namespacing, and warning fixes.