Documentation and Some code improvements.