Merge lookup command

All tests for the lookup command currently pass.