Moving the preprocessing state machine to preprocessing directory