pulling out nav.js. improving error feedback.