Revert 6aa793d..a3f5d1f

This rolls back to commit 6aa793dd1c5e84690ebf47fd3646c9e6f2365d93.
Simplified dollarPermutations with string concatentation.
Cherry-pick commit 5640360595055387f8f14e30aea39a88d920349e