Fixed if statement and API calls.
Merge pull request #5 from schmitzt3/gh-pages

Fixed if statement and API calls.