IRCode generation mostly working