changing ajax calls
some refactor
js ajax