fixed some preprocessing issues
removed cruft