Preprocessing debugged and tested