Request to merge fix for mac and refactor into master

The conditions testing against '1' were failing for me, returning no information, because on my computer the values were an integer 1.  Handle both cases via to_s and reduce amount of change via refactor of checks into four methods.