Add code to extract local vars and their types