#10: Added Q library to use promises and handle sync task resolution