nav page js complete, cleaned up code and commented