Change fragments to scripts instead of sourcing