Now we can execute all commands within a pipe.
Fixed some errors with exiting and moved around some code to make way for the piping code.