Fix some references
Nicer JavaScript source code