Added promises
Removed Ajax