Clean unused variables.
Merge branch '1838-path-independent' of git.chevah.com:brink into 1838-path-independent
Fix infinite loop by removing unused code.