Abstract Feed functionality to separate js file