Added sorting functionality for categories. This is now reflected in the application navbar.