Fixed several drawing bugs and opcode bugs. Includes debug output