Refactoring

Minor fix-ups and moving things around:

1. Wrap all libraries in IIFEs (Immeiately Invoked Function Expressions) to prevent namespace pollution
2. Move examples to be language-based (separate folder for each langage)
3. Move file-like functions to their own library, to clean up workspace.js.