refactor main to nav and content templates