Clean up variables and modify the behavior to echo.