Did some cleanup, like remove delegates.
Added first fix for free vars.
Added ref counting to lvars.