Documentation and style improvements