Ajax updater rewritten for much smaller code