
When switching on type you need to use strings because of the whitespace in some of the names. This isn't too important but would be a nice to have.
Also the use of function as the variant type could cause issues for people building tooling on top of it. Again nothing major.