Moved listing() function to Model instead of Controller