rename width to siteWidth
tidied up comments
renamed checknav function