Updated event code (still working on it), added amplitude wavelength code