Add filtered AJAX output for environment and data source parameters, remove redundant code