Updated variable parsing