First working draft + tests