Preprocessing

closes #9