Documentation and some changes