added preprocessing shell script, plus removed some unneeded debug prints