Clean up split_params code