fix a few bugs in bytecode generation, and add prelimenary compilation of local (llocal vars work, local functions are a WIP)