save root category for each wiki separately
fixed saving root categories
some refactorings