update some documentation, improve JS a little bit