Added $s literals and small refactors.