Removed some old comments and unused variables. Added logic so that endnotes will properly redirect given GitBook file structure.
Nothing substantive.