Optimized code and removed a obsolete NavigationBar class