Fixed a bunch of stuff. Added an option to fully flatten the generic tree for reflection (trade-off against download size). Added instance/type generic specialization too.

TODO:
- Check for missing bits of specialization.
- Add more to reflection API.
- Improve naming for smaller downloads.