Fixed #33

Now properly creates multiple arguments in one head.js call instead of doing multiple head.js calls.
Fixed bug: Moved resource-url variable inside loop
Fixed bad formatting
Merge pull request #34 from dmmikkel/unstable

Fixed #33