Silly constants -> parameters
Clean up gen.py
Clean up cosine_nn.py
Move cached to utils.py
Use collections.namedtuple for inverse index entry
Improve comments
Add sample usage to readme