Documentation and some minor changes