multiple ajax request working with done + some refactorings