Rearranging javascript.
More setup for flickr integration.