re-organized contact and categories, and command refactoring (with olivier)