Debug name errors

Fixed undeclared variables in nickleby-search and changed
variable names.