Sort-of-implement lexical scope (needs proper sorting still), fix VM bugs