Documentation and code cleaning - refs BT#7017