updated trends view and modularized for separation of concerns (mvc)