Added typeahead for category field. Made categories non global.