pulled out all standard javascript to main

folded the new improved speech-bubble into main, and lifted all the
panel action etc.
pointed at main.js

and removed all the inline code that is now in main.js
ocd indentation