Documenation and improvements