Added methods to query jobs status for async jobs
re-factoring and clean-up