on post page categories now work + code tidy