Finish the variable search - Reformat the code