import code from tshell, rewrite most of it, completely reworked basic run command