Merge latest changes from snktagarwal

I noticed that some latest changes from snktagarwal haven't yet been merged to the original repository. This pull request is to merge those changes so that I have latest code from both.