cosmetic(ish)
- sensible order of exports / specs / functions
- remove unneeded exports
- inline some functions