Fixed two bugs: the preecding space and tab remover regex was malformed and greedily age 't'. Second bug was the variabel replacer was gettign eaten by the first bug.