DRY'd echo.js