retrieveCategories, doGet and Main updated