Documentation and minor fixes