Cleaned up code, added opcodes.