Some un-pushed changes.
This still doesn't work with the latest Riot build, but it's the latest code.