Extract common operation of dedent and left strip
Extract script variable for clarity
Reindent