Make mior changes to for loop
Make function for getting fd's
Remove function numCommmands. Remove storage of '|' in vector
Fix isBackground
Refactor piping