Edited setNav and checkMobile functions