Implemented incremental prediction
And cleaned some things up