Changed lots of stuff to Double, RUNS SLOWER NOW, but learns better. We
have to have some double values so I'm not sure what else to do (double
instead of Double would probalby be nice, but lookahead needs to set to
null, so need to use Double).