adjust indentation
remove unused 'windows' variable
do not declare var "text" shadowing argument
adjust indentation