First working version
Added some documentation