Adding of pipe deflection code

Adding of code for Pipe_Deflection function.