Added smoothness, a bit confused about how the latent state interface works...
This seems to thelp, though the cost function is really bad