Polishing

- Fix tests
- Add integration test
- More documentation