First working version, and updated docs