Facade  changes

- Added encoding information to index.html
- Moved facade stuff into a namespace
- Added facade to scripts
- Moved facade constants to their own scope
Changed a param name