add documentation, code clean-up and multiple browser test