First working version
Add some tests