Moved sql query for getting categories into category model class #61