Documentation and improvements