Added a lot more documentation to explain how this works.
Clarify some of the usage of the new extract_javascript.