Documentation and fixes