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