Updated ajax scripts (wip)