Improve ajax interactions