Complete rewrite of documentation