Implement out-of-tree build and packaging. Unneeded includes cleaned up.