Added pipe support and other functions