Preprocessing now seems to work (with a few hacky solutions)