From http://alistapart.com/article/the-design-of-code-organizing-javascript