First full version. Added all opcodes, improved work with contexts