adjusted formatCategory() for empty cats, removed unused injections