Improve gitignore, fix bugs, upgrade js libs