imporoved code readability. Improved JavaScript design

Used designs from The Good Parts and Design Patterns to improved TOAD
overall design.
Merge branch 'master' of https://github.com/dyro/toad.js