Relocated some file, also fixed a pipe bug and added a new routing
fuction to the pipes.