Refactor generate feed items

refactor, some style changes, etc