Remove unused variables
Add lookup and tests