Updated to fix recent changes on Riot's end. Also minor code cleanup.
Merge pull request #24 from ssesfahani/update-fix

Updated to fix recent changes on Riot's end. Also minor code cleanup.