Documentation and minor improvements