Add navigation view to avoid code repetition.