Fix some ajax related bugs
Add gitignore
sync