It may be too late for the OP but my best advice is LOOK at what you have BEFORE you disconnect the wires from the old fitting.If, as in this case, you have for instance brown wires going to different places, then mark them in some way so you know which ones go the the loop connection, and which one(s) goes to the light itself. Draw a diagram of how the old light was connected, then, if all else fails you will be able to revert back to the old light until you can work out what went wrong.
Then there will be no confusion when fitting the new light.
Just ripping out the old light, then wondering where they all go is NOT the way to do it.