Documentation and small cleanup