New opcodes implemented and code refactoring