Link to FAQ section on where to find the application id and password.
Handling task states more explicitly.
Comments on waiting for tasks, optimized waiting code.