Details
Description
Clean up the event registration code, with focus specifically on the following:
1. the preprocess function is super long. 340 lines.
2. There are sections of the code which do some sanity checks and also initialize various variables and sets various conditions based on things that have happened
3. If we come back to those sections, the sanity checks / initialization do not get executed (good), but the various conditions stuff needs to get executed
4. there are variables like: _participantId, _participantIDS and registerById. The first does not seem related to the second