Transform LAN AJAX calls to promises

for better efficiency