Check for addresses first.  Renamed several variables to elucidate their meaning.  Reordered function declarations to improve readability.
Merge pull request #10 from ryayak1460/master

Check for addresses first.  Renamed several variables to elucidate their...