Add documentation and a lot of new stuff