Changes ajax logic and some orthographic fixes