added a not so elegant (mathematically) fix to keep kalman covariance matrix always positive definite. Also added a very simple forgetting factor. Much like the java code it seems to track slope better than it tracks intercept, probably because it varies more in absolute terms.
Time to test this for predictors. This will be a pain in the butt.