added current page detection to categories and such