chore: more tests and some cleaning

* Analysis module moved to insights (with its dependencies)
* First tests for api and data modules
* Minor improvements based on this tests