adds ajax code to fetch features and categories