Refactored navigation.js to use functions for each click event