How to organize code entered from the head tag?

Did you take a look at Split up theme Javascript into multiple files?