Extract common content into includes and variables