pipe support added; fixed almost every known error; rationalized code even further