Imported updates I made from working on another project. Reformmated document with TextMate's JS formatting.