feed template code cleanup