Nicer script after p0s review, typos, escaping correctness re spaces [bugfix][security]