Refactored loadscript to also receive css not only js