Adding prediction-fields and headers options, --test reading from stdio and some tests