Tests

This PR is still not ready yet, I mainly decided to issue it to have things to discuss.