fixed live variables analysis, made a few changes/fixes/improvements to various other helpers functions