Add simple preprocessing functionality. Not complete