Removes repetitive code from static_pages_spec.