- Cleanup for kosmos
- More madnes in cpp impl