make a lookup function
add a keys accessor
a little more commenting, and some better speed options for the tests