added preferences window for categories. restructured gui module.