refactored ajax requests (bug 848952) WIP