Refactoring code for navigation, using variables for colors