Fix hyper-param bugs

Two of them:
1. Was double-counting by adding at the end of train, then adding in
the loop of query(i.e. another call to train)

2. Get hyper parameter learning working inside each individual
iteration.
Formal smoothing for vocab

Using an actual prior instead of an ad-hoc approach