- fixed all pb charset encoding
- put all js functions in a separate js file