fixed merge code typo in js and added some missing semicolomns for style...

... purposes