JL: Made kalman.jl match kalman.py and made small changes to solve_riccati etc...