After the takedown pin is out of the way, slide the upper receiver forward. You will notice that the charging handle will get caught on a small nub on the top of the gearbox. Simply pull the charging handle back slightly and lift it over the nub.
Continue to pull the upper receiver forward until the two halves separate. Do not yank on the wires too hard if they get stuck, just gently guide them out.