fixed small js bugs->missing semicolons, etc