Fix DOM loading issue with border nav and refactor.