fixed js bugs and improved menubar