Fix #6 (cleaning of the vectors of events tried for training)

I have not tested the change, but Natalia assures me it will work fine.
Update environment and Makefiles to SL6 and modern versions