Lookup implementation

PR @zancas's work on lookup. PRs make it easy to do code reviews when new commits are pushed.
This log message is inaccurate; you're not returning `None`, you're raising.