categories and many fixes