Added structure to handle variable allocations and references along with basic variable management