Corrected previous commit

I had added a lot of code for debugging and I accidentaly deleted more than intended.