Documentation and swap example