renamed all tla to tim and fixed runcmd memory leak