Simplified setMode method into Navigator.java