Minor optimization: using variable_names instead of term_variables/2