Refactored the way we pass the callbacks to the NavigationButton class.