a few rearrangements in initialising, implemented pipe
pipe now uses commands, not loadstring