Cleanup, and fix lookup match