Fixing compilation errors related to refactoring.

Also removed old 'pipe' files. Most of the errors with respect to
non-application-specific spire are fixed.