Charts and javascript Enhancements

Fixes #35, #39, #47, #49 and other minor changes