Several pipeline management functions added, not working yet.