refacted javascript includes