Finish implementation of .lookup.