Change UI to not show a link if the user does not have the correct permissions (#1421648) and a few minor code tidyups.
Conflicts: variablecheck.module