endjs should always be outside content or it will appear twice. We should definitely move everything into the headjs.