Fix typo in debug message
Refer to generated js files
Use spy objects
Add tests
Suffix an underscore(_) to all private instance members.

This is useful to distinguish private members on javascript code.