Add Null check
Merge pull request #20 from nataren/issue_19

Add Null check.
Save refactor progress
Refactor some code to support batch processing of prs on startup