Simplify code to share head and links php files