just match to the battery then.
tamiya connectors can be weird in airsoft, they tend to be wired reverse to RC batteries so it's not a given that the colours match. presumably for the same reason as the eclectic wire colouring- because electrical engineers are a strange bunch.
as long as you keep track in your mind (write it down if needs be) which goes where then that'll do the job. if the motor runs backwards just swap the wires over problem solved.
you could try swapping the o rings over, see if that does it, there's other tricks like stretching the o rings or swapping them out for one slightly oversize.
that's an alu head isn't it? i know some of the plastic mushroom heads have issues with the texture of the plastic giving a poor seal but the alu one shouldn't.
never needed to cut a window and the only box i've had the luxury of viewing the motor mesh is the open bottomed a&k mg boxes, which funnily enough are awful for accumulating dirt+crap in them.
start by getting the idler and sector shimmed down as far as they'll go (working on the left hand half of the box) and such that they're running free even when the box is tightened up and tilted all different directions.
that'll give you the most wiggle room on the bevel to go up/down as needed, then shim that as above (so you know your starting point of say 1mm total, then you can swap shims from one side to the other to move it up and down)
you can try the bevel in the right half with the motor cage in position to give a very rough starting point, then it's just try it, adjust, try it again.
running the motor with just the gears can give an idea of how much noise there is, how smooth everything is sounding etc.
once you've got the bevel height where you want it, check how much overlap there is between the pinion and the idler and if necessary raise the idler/sector just to keep a decent overlap (ie that you're not driving on only half the teeth)