Correct formatting
Use jQuery promises!