delete unused JS; use a common service to display error messages