Fixed some bugs and tested for predicting one particular value.