cleaned-up kalman (closes #3)