Added data linearisation for mass spectra and fixed bugs