Update NavigationController.js

Moved this back to the commonJS way, and also improved the back() and home() functions to work effeciently